function [mockData mockLabels] = getMockData(data, labels, labelsCount=2, density=0.1)
    uniqLabels = unique(labels);
    mockLabels=[];
    mockData=[];
    order = randperm(size(uniqLabels,1));
    uniqMockLabels=uniqLabels(1:labelsCount,1);
    
    minCount = sum(labels==uniqLabels(1,1))*density;

    for(i=2:size(uniqLabels,1))
        minCount=min(minCount,sum(labels==uniqLabels(i,1)));
    endfor;


    for(i=1:labelsCount)
        tempLabels=labels(labels(:,1)==uniqMockLabels(i,1),1);
        tempData=data(labels(:,1)==uniqMockLabels(i,1),:);
        tempOrder=randperm(size(tempLabels,1));
        
        selector = tempOrder(1:minCount);
        mockLabels=[mockLabels; tempLabels(selector,1)];
        mockData=[mockData; tempData(selector,:)];            
    end;
end;
